<!--#
 @version 0.3 (auto-set)
#-->
<!-- table shouts search -->
<!-- results -->



<!-- search results (list) -->
<div id="shoutboxContent" class="ui-widget-content">
<#LANG_LOADING#>...
</div>
<!-- / search results (list) -->
<!-- / results -->

[#if NOT_LOGGED#]
[#if MOBILE!="1"#]
<p>
<#LANG_PLEASE_LOGIN#>
</p>
[#endif MOBILE#]
[#else#]
<form action="?" name="frmShoutBoxMsg" method="get" style="margin:0px" onSubmit='return false;'>
<table border=0>
<td><#LANG_COMMAND#>:</td>
<td><input type="text" name="message"></td>
<td><input type="submit" name="submit" value="<#LANG_SEND#>" onClick="return sendShoutMessage();"></td>
</table>
</form>
[#endif#]

<script language="javascript">

var shoutTimer;

 function updateShoutContent() {
  clearTimeout(shoutTimer);

  var url="?";

   url=url+'&limit=<#LIMIT#>&getdata=1';
   $.ajax({
    url: url,
    }).done(function(data) { 
     $('#shoutboxContent').html(data);
    });

  [#if (NOT_LOGGED!="1") || (MOBILE=="1")#]
  shoutTimer=setTimeout("updateShoutContent('', '');", 10000);
  [#endif NOT_LOGGED#]
 }

 function sendShoutMessage() {
  if (document.frmShoutBoxMsg.message.value == '') return false; 
  var msg=URLencode(document.frmShoutBoxMsg.message.value);
  document.frmShoutBoxMsg.message.value='';
  var url="?";
  url=url+'&limit=<#LIMIT#>&msg='+msg;
  $.ajax({
   url: url,
   }).done(function(data) { 
    $('#shoutboxContent').html(data);
   });
  return false;
 }
</script>


<script language="javascript">
 updateShoutContent();
</script>
